import logging
import os
import shutil
import subprocess


def execute_short_command(command):
    process = subprocess.Popen(command ,stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,encoding='gbk' ,shell=True)
    return process.stdout.read()

def delete_dir(dir_path):
    if os.path.exists(dir_path):
        shutil.rmtree(dir_path)

def get_dir_name(path_file):
    return os.path.dirname(path_file)

def set_env_param(env_param,value):
    os.environ[env_param] = value

def get_env_param(env_param):
    return os.environ.get(env_param)





